home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / snobol4.vim < prev    next >
Encoding:
Text File  |  2001-05-11  |  2.4 KB  |  72 lines

  1. " Vim syntax file
  2. " Language:    SNOBOL4
  3. " Maintainer:    Rafal Sulejman <rms@poczta.onet.pl>
  4. " Last change:    21 Jun 2000
  5.  
  6. " For version 5.x: Clear all syntax items
  7. " For version 6.x: Quit when a syntax file was already loaded
  8. if version < 600
  9.   syntax clear
  10. elseif exists("b:current_syntax")
  11.   finish
  12. endif
  13.  
  14. syntax case ignore
  15. " A bunch of useful SNOBOL keywords
  16. syn match snobol4Label    "^[^ \t]*"
  17. syn keyword snobol4Statement    OUTPUT TERMINAL SCREEN INPUT
  18. syn keyword snobol4Function    ARB ARBNO POS RPOS TAB TRIM SIZE
  19. syn keyword snobol4Function    RTAB REPLACE DUPL DATATYPE CONVERT
  20. syn keyword snobol4Function    LEN DEFINE TRACE STOPTR CODE REM
  21. syn keyword snobol4Function    DIFFER IDENT ARRAY TABLE
  22. syn keyword snobol4Function    GT GE LE EQ LT NE LGT
  23. syn keyword snobol4Function    ANY NOTANY BREAK SPAN DATE
  24. syn keyword snobol4Function    SUBSTR OPSYN INTEGER REMDR BAL
  25. syn keyword snobol4Todo contained    TODO
  26. syn match snobol4Keyword        "&TRIM\|&FULLSCAN\|&MAXLNGTH\|&ANCHOR\|&ERRLIMIT\|&ERRTEXT"
  27. syn match snobol4Keyword        "&ALPHABET\|&LCASE\|&UCASE\|&DUMP\|&TRACE"
  28. "integer number, or floating point number without a dot.
  29. syn match  snobol4Number        "\<\d\+\>"
  30. "floating point number, with dot
  31. syn match  snobol4Number        "\<\d\+\.\d*\>"
  32. "floating point number, starting with a dot
  33. syn match  snobol4Number        "\.\d\+\>"
  34.  
  35. " String and Character contstants
  36. syn region  snobol4String          start=+"+  skip=+\\\\\|\\"+  end=+"+
  37. syn region  snobol4String          start=+[^a-zA-Z0-9]'+  skip=+\\\\\|\\"+  end=+'+
  38.  
  39. syn match   snobol4MathsOperator   "-\|=\|[:<>+\*^/\\]\||\|"
  40. syn match  snobol4Comment     "^\*.*$"
  41.  
  42. " Define the default highlighting.
  43. " For version 5.7 and earlier: only when not done already
  44. " For version 5.8 and later: only when an item doesn't have highlighting yet
  45. if version >= 508 || !exists("did_snobol4_syntax_inits")
  46.   if version < 508
  47.     let did_snobol4_syntax_inits = 1
  48.     command -nargs=+ HiLink hi link <args>
  49.   else
  50.     command -nargs=+ HiLink hi def link <args>
  51.   endif
  52.  
  53.   HiLink snobol4Label        Label
  54.   HiLink snobol4Conditional    Conditional
  55.   HiLink snobol4Repeat        Repeat
  56.   HiLink snobol4Number        Number
  57.   HiLink snobol4Error        Error
  58.   HiLink snobol4Statement    Statement
  59.   HiLink snobol4String        String
  60.   HiLink snobol4Comment    Comment
  61.   HiLink snobol4Special    Special
  62.   HiLink snobol4Todo        Todo
  63.   HiLink snobol4Function    Identifier
  64.   HiLink snobol4Keyword    Keyword
  65.   HiLink snobol4MathsOperator    Operator
  66.  
  67.   delcommand HiLink
  68. endif
  69.  
  70. let b:current_syntax = "snobol4"
  71. " vim: ts=8
  72.